<template>
	<div>
		<el-table :data="info" :header-cell-style="{ 'text-align': 'center' }" :cell-style="{ 'text-align': 'center' }"
			class="w-full">
			<!-- // 3 -->
			<el-table-column v-if="types.condition_type == 3" label="SKU" show-overflow-tooltip>
				<template #default="scope">
					{{ scope.row.sku || scope.row.condition_value }}
				</template>
			</el-table-column>
			<el-table-column v-if="types.condition_type == 1" prop="condition_value" :label="$t('marketing.preferential.minAmount')+':'"
				show-overflow-tooltip />
			<el-table-column v-if="types.condition_type == 2" prop="condition_value" :label="$t('marketing.reduction.minQuantity')"
				show-overflow-tooltip />
			<el-table-column v-if="types.condition_type == 0" prop="condition_value" :label="$t('marketing.reduction.Nolimit')"
				show-overflow-tooltip />

			<!-- // 1 3 -->
			<el-table-column v-if="types.fd_type == 1 || types.fd_type == 3" prop="g_name" :label="$t('machine.goods.name')"
				show-overflow-tooltip /> 
			<el-table-column v-if="types.fd_type == 2" prop="active_value" :label="$t('order.consume.discountAmount')" show-overflow-tooltip /> 
			<el-table-column v-if="types.fd_type == 3" prop="active_value" :label="$t('marketing.preferential.giftRate')+'(%)'" show-overflow-tooltip />
			<el-table-column v-if="types.fd_type == 4" prop="active_value" :label="$t('marketing.preferential.discounts')+'(%)'" show-overflow-tooltip />
		</el-table>
	</div>
</template>

<script lang="ts" setup>
import { useI18n } from 'vue-i18n' 
const { t: $t } = useI18n()
let props = defineProps({
	info: {
		// 主体数据
		type: Array,
		default: []
	},
	types: {
		type: Object,
		default: {}
	}
})
</script>
